home *** CD-ROM | disk | FTP | other *** search
- remstart
- __ __ ______ __
- __/ /_ / /__ _____ / ____/_____ _____ / /__ _____
- /_ __// __ // _ // / __ / _ // ___// // / / /
- / / / / / // __// /_/ // __// /__ / _ / / // /_
- /_/ /_/ /_//____//_____//____//____//_/ \_\/____/ \
- / /
- \ Mirror Technology Demo \
- / Version 1.00 - 27th January 2001 /
- \ \
- / Author: Rob Moran [theGecko] /
- \ Web: http://www.gecko.f2s.com \
- / E-Mail: gecko@f2s.com /
- \ AIM: Rob M0RAN \
- / ICQ#: 105558276 /
- \ \
- /_________________________________________________/
-
- remend
-
- `------------------------------------------------------SETUP------------------------------------------------------
-
- set display mode 800,600,16
- autocam off
- hide mouse
- sync on
- backdrop on
- color backdrop rgb(0,0,0)
- anglex1# = -90.0
- anglex2# = -87.0
- angley2# = 175.0
- cameraspeed# = 50.0
-
- `-----------images
-
- load image "map1.bmp",101
- load image "map2.bmp",102
- load image "text1.bmp", 103
-
- `convert image to sprite to make it see-through
- sprite 1,0,0,103
-
- `-----------models
-
- `load in the same object twice
- load object "can.x",201
- load object "can.x",202
- load object "can2.x",203
-
- load object "wall.3ds",205
- load object "frame.3ds",206
- load object "glass.3ds",207
-
- `position objects
- position object 201,0,0,-100
- position object 202,0,0,-100
- position object 203,0,0,100
- position object 206,0,0,-1
-
- `scale one object slightly smaller than the other so that their textures don't interfere
- scale object 202, 99, 99, 99
-
- `replace the texture of the 'larger' object with the reflection map and make it 'ghostly'
- texture object 201, 101
- texture object 207, 102
- ghost object on 201
- ghost object on 207
-
- position camera 100.0, 100.0, -200
- point camera 0, 0, -50
-
- `----------------------------------------------------MAIN LOOP----------------------------------------------------
-
- do
- `get any mouse movements
- movex# = mousemovex()
- movey# = mousemovey()
-
- if mouseclick()=1
- `move round when mouse buttons pressed
- if camera position x() + movex# < -200 then movex# = 0.0
- if camera position x() + movex# > 200 then movex# = 0.0
- if camera position y() - movey# > 200 then movey# = 0.0
- if camera position y() - movey# < -200 then movey# = 0.0
-
- position camera newxvalue(camera position x(),movex#,cameraspeed#), newyvalue(camera position y(),movey#,cameraspeed#), -200.0
- scroll object texture 207, 0.0-(movey#*0.0055), (movex#*0.00275)
- point camera 0, 0, -50
- else
- anglex1#=wrapvalue(anglex1#-movey#)
- angley1#=wrapvalue(angley1#-movex#)
- anglex2#=wrapvalue(anglex2#+movey#)
- angley2#=wrapvalue(angley2#+movex#)
-
- `rotate both objects at the same time
- rotate object 201, anglex1#, 0.0, angley1#
- rotate object 202, anglex1#, 0.0, angley1#
- rotate object 203, anglex2#, 0.0, angley2#
-
- `this is the funky bit - move the texture offset of the reflection map in the opposite
- `direction as the mouse moves, thus keeping the texture facing the camera
- `the current angle must be tested to counteract the texture scrolling the wrong way
- if anglex1# > 180 & anglex1# < 360
- scroll object texture 201, (movex#*0.00275), (movey#*0.0055)
- else
- scroll object texture 201, (movex#*0.00275), 0.0-(movey#*0.0055)
- endif
- ` ^--------------------^------- these numbers work for
- ` any model/texture
- endif
- sync
- loop
-
- `------------------------------------------------------END--------------------------------------------------------
-